-
Notifications
You must be signed in to change notification settings - Fork 913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: Fix libpq
for Docker multi-arch builds and Bookworm upgrade
#7921
base: master
Are you sure you want to change the base?
Conversation
da58237
to
39f5b1a
Compare
Sooo... after some more rigorous testing, the first iteration actually broke
This has been tested by running a cross-platform build on an
This error indicates The learning from testing this has prompted considerations on trying to add static linking support for |
Managed to test the cross-compiled images on an M2 Mac and Raspberry Pi 4, both Don't have an |
39f5b1a
to
abd6276
Compare
Rebased against |
Thanks for the review! So the only TODO is to look into installing the |
Yes, that should be good enough. |
- Add Postgres dependencies: bison, flex and libiu-dev. - Fix missing `&&` in chained wget commands. - Add `POSTGRES_CONFIG` and `PG_CONFIG` for all architectures. - Remove existing `libpq` Ubuntu packages. - Copy libpq libraries from builder directly to final image. Changelog-Fixed: Fixes Postgres driver availability for arm64 and arm32 Docker images.
Undertaken to upgrade QEMU to 7.2. Also upgrades Python to 3.11 implicitly and migrates Python dependency management to virtual environments. Changelog-Changed: Released Docker images are now based on Debian Bookworm
- Align indentation. - Use multi-line `ENV` where values don't depend on each other. Changelog-None
abd6276
to
3dabe66
Compare
|
This PR adds upon the excellent initial work done by @arowser in #7827 on cross-compiling
libpq
through the multi-architecture Docker release builds. Exhaustive testing exposed some local Docker build errors which have been addressed in additional commits.Upon running into some local QEMU segmentation faults while cross compiling, we noticed that
qemu-user-static
was on a rather old version of5.2
under Debian Bullseye. Therefore, we also update the Docker release base images to Bookworm, pushing QEMU to7.2
. Bullseye is "old stable" and Bookworm is now "stable", so there is a case to be made for upgrading.Additionally, Python is upgraded to 3.11 as a corollary. Currently setting
pip
flags to break system packages, mainly in the interest of time, but this could be addressed to use virtual environments if required.wget
.libicu-dev
,bison
andflex
.libpq
Debian package installs.POSTGRES_CONFIG
declaration for each cross compile target.PG_CONFIG
for all targets.pg_config
to runldconfig
, making compiled libraries available to the system.libpq
libraries from thebuild
stage to thefinal
stage using a bind mountRUN
command.3.11
.Dockerfile
formatting and standardize the use ofENV
directives when the values are not interdependent.The full multi-arch build has been tested locally by building on
amd64
.Still need to figure out a way to get thearm
target image onto a Mac to testlibpq
from inside a container.Fixes #7649
Relates to and duplicates #7827
Respectfully, these changes have also been submitted in a PR against @arowser's branch here. As there is a bounty posted for #7649, I yield to the CLN core teams determination on who should win the payout or on whether / how to divide it. 🙏
Checklist
Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked: